//
//  UIColor + Extension.swift
//  1026SwiftSinaWeiBo
//
//  Created by Apple on 15/10/29.
//  Copyright © 2015年 itcast. All rights reserved.
//

import UIKit


extension UIColor {
    
    class func randomColor() -> UIColor {
        
        return UIColor(red: randomNum(), green: randomNum(), blue: randomNum(), alpha: 1.0)
    }
    
    
    //MARK: - 产生0 到 1的随机数
    private class func randomNum() -> CGFloat {
    
        return CGFloat(arc4random_uniform(256)) / 255.0
    }
}